package com.graduation.rescuematerial.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.rescuematerial.dto.HelpNewsDTO;
import com.graduation.rescuematerial.pojo.HelpNews;
import com.graduation.rescuematerial.vo.HelpNewsInfo;
import com.graduation.rescuematerial.vo.UpdateHelpNewsVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author CaiShuangLian
 * @since 2022-04-24
 */
@Mapper
public interface HelpNewsMapper extends BaseMapper<HelpNews> {

    /**
     * 发布信息
     * @param helpNewsInfo
     * @return
     */
    int publishHelpInfo(HelpNewsInfo helpNewsInfo);

    List<HelpNewsDTO> getAll();

    List<HelpNewsDTO> getByCompanyName(String companyName);

    Integer updateStatusByCompanyName(UpdateHelpNewsVo updateHelpNewsVo);

    List<HelpNewsDTO> getUnsolveInfo();

    List<HelpNewsDTO> fuzzyQuery(String key);
}
